<template>
  <div>
    <el-descriptions title="User Info">
      <el-descriptions-item label="Username">{{ userInfo.name }}</el-descriptions-item>
      <el-descriptions-item label="Address">{{ userInfo.address }}</el-descriptions-item>
      <el-descriptions-item label="Sex">{{ userInfo.sex }}</el-descriptions-item>
      <el-descriptions-item label="Age">{{ userInfo.age }}</el-descriptions-item>
      <el-descriptions-item label="Email">{{ userInfo.email }}</el-descriptions-item>
      <el-descriptions-item label="Birthday">{{ userInfo.birthday }}</el-descriptions-item>
    </el-descriptions>
    <div class="about">
      <el-button type="primary" @click="jump('login')">login</el-button>
      <el-button type="primary" @click="jump('401')">401</el-button>
      <el-button type="primary" @click="jump('button')">button</el-button>
      <el-button type="primary" @click="jump('radio')">radio</el-button>
    </div>
    <Account />
    <HelloWorld />
  </div>
</template>

<script setup>
import Account from '@/components/Jsx/Account'
import HelloWorld from '@/components/Jsx/HelloWorld'
import { getUserInfoAPI } from '@/api/user'
// import { useAppStore } from '@/store/index'
// import { exportedModules } from '@/store/index'
import { useRouter } from 'vue-router'
const router = useRouter()

function jump(row) {
  router.push(row)
}
const userInfo = ref({})
const getFetchData = async () => {
  const res = await getUserInfoAPI()
  userInfo.value = res.data
}
onMounted(() => {
  getFetchData()
})
</script>
